<!-- S 头部 -->
<div class="admin-header J-admin-header">
	<div class="admin-header-box">
    	<!-- S logo -->
        <a href="/"><h2 class="admin-logo">&nbsp;</h2></a>
        <!-- E logo -->
        <!-- S 导航 -->
        <div class="nc-module-menu J-nc-module-menu">
			<?php
				if(Purview::checkPurview($this->UserConfig['Id'],array('crm','credit','input'))){
			?>
            <dl>
            	<dt class="J-reference">
                	<a href="javascript:;">
                    	<em class="nav-zxlr"></em>
                        <span>征信发起</span>
                    </a>
                </dt>
                <dd></dd>
            </dl>
			<?php
				}
				if(Purview::checkPurview($this->UserConfig['Id'],array('crm','stretch','index'))){
			?>
            <dl>
            	<dt class="<?php if(in_array($this->Controller,array('stretch'))){echo 'on';}?>">
                	<a href="/stretch/index/">
                    	<em class="nav-trsq"></em>
                        <span>通融申请</span>
                    </a>
                </dt>
                <dd></dd>
            </dl>
			<?php
				}
				if(Purview::checkPurview($this->UserConfig['Id'],array('crm','supplement','index'))){
			?>
            <dl>
            	<dt class="<?php if(in_array($this->Controller,array('supplement'))){echo 'on';}?>">
                	<a href="/supplement/index">
                    	<em class="nave-clxxbr"></em>
                        <span>车辆信息补入</span>
                    </a>
                </dt>
                <dd></dd>
            </dl>
			<?php
				}
				if(Purview::checkPurview($this->UserConfig['Id'],array('crm','orderedit','index'))){
			?>
            <dl>
            	<dt class="<?php if(in_array($this->Controller,array('orderedit'))){echo 'on';}?>">
                	<a href="/orderedit/index">
                    	<em class="nav-ddsqxg"></em>
                        <span>订单申请修改</span>
                    </a>
                </dt>
                <dd></dd>
            </dl>
			<?php
				}
				if(Purview::checkPurview($this->UserConfig['Id'],array('crm','sys'))){
			?>
            <dl>
            	<dt class="<?php if(in_array($this->Controller,array('department', 'region', 'branch', 'bank', 'member', 'role', 'setting', 'bank', 'dealers'))){echo 'on';}?>">
                	<a href="#">
                    	<em class="nav-xtzx"></em>
                        <span>系统中心</span>
                    </a>
                </dt>
                <dd class="fn-hide J-sub-nav">
					<?php
						if(Purview::checkPurview($this->UserConfig['Id'],array('crm','sys','department', 'index'))){
					?>
                    <a href="/department/">部门管理</a>
					<?php
						}						
						if(Purview::checkPurview($this->UserConfig['Id'],array('crm','sys','region', 'index'))){
					?>
                    <a href="/region/">大区管理</a>
					<?php
						}						
						if(Purview::checkPurview($this->UserConfig['Id'],array('crm','sys','branch', 'index'))){
					?>
                    <a href="/branch/">网点管理</a>
					<?php
						}						
						if(Purview::checkPurview($this->UserConfig['Id'],array('crm','sys','bank', 'index'))){
					?>
                    <a href="/bank/">银行管理</a>
					<?php
						}
						if(Purview::checkPurview($this->UserConfig['Id'],array('crm','sys','member', 'index'))){
					?>
                    <a href="/member/">用户管理</a>
					<?php
						}
						if(Purview::checkPurview($this->UserConfig['Id'],array('crm','sys','role', 'index'))){
					?>
                    <a href="/role/">权限管理</a>
					<?php
						}
						if(Purview::checkPurview($this->UserConfig['Id'],array('crm','sys','setting', 'auindex'))){
					?>
                    <a href="/setting/auindex/">审核管理</a>
					<?php
						}
						if(Purview::checkPurview($this->UserConfig['Id'],array('crm','sys','bank', 'rtindex'))){
					?>
                    <a href="/bank/rtindex">银行利率管理</a>
					<?php
						}
						if(Purview::checkPurview($this->UserConfig['Id'],array('crm','sys','dealers', 'index'))){
					?>
                    <a href="/dealers/">经销商管理</a>
					<?php
						}
					?>
                </dd>
            </dl>
			<?php
				}
				if(Purview::checkPurview($this->UserConfig['Id'],array('crm','report','index'))){
			?>
            <dl>
            	<dt class="<?php if(in_array($this->Controller,array('report'))){echo 'on';}?>">
                	<a href="#">
                    	<em class="nav-trsq"></em>
                        <span>报表中心</span>
                    </a>
                </dt>
                <dd class="fn-hide J-sub-nav">
                    <a href="/report/index/option/unsecured">未抵押报表</a>
                    <a href="/report/index/option/carfare">车资未齐报表</a>
                    <a href="/report/index/option/overdue">逾期报表</a>
                    <a href="/report/index/option/compensatory">代偿报表</a>
                    <a href="/report/index/option/advance">公司垫款明细表</a>
                    <a href="/report/index/option/telaudit">电审通过明细表</a>
                    <a href="/report/index/option/proorder">问题件报表</a>
                    <a href="/report/index/option/contract">合同未收到报表</a>
                    <a href="/report/index/option/gps">已垫gps未上线表</a>
                    <a href="/report/index/option/carreport">二手车评估报告</a>
                    <?php if(Purview::checkDptype($this->UserConfig['Id'],array('dp','rg'))){?>
                    <a href="/report/index/option/brstandard">网点风控标准</a>
                    <?php }?>
                </dd>
            </dl>
					<?php
				}
			if(Purview::checkPurview($this->UserConfig['Id'],array('crm','assessment','index'))){
				?>
				<dl>
					<dt class="<?php if(in_array($this->Controller,array('estimate'))){echo 'on';}?>">
						<a href="/estimate/index">
							<em class="nave-clxxbr"></em>
							<span>评估发起</span>
						</a>
					</dt>
					<dd></dd>
				</dl>
			<?php
				}
			?>
        </div>
        <!-- S 导航 -->
        <!-- S 用户信息 -->
        <div class="admin-user-box">
        	<ul class="admin-user-info">
            	<li><img src="<?php echo $this->member_info['u_avatar'];?>" width="32" height="31" /></li>
                <li class="ml10" style="width:75px; height:35px; overflow:hidden;"><?php echo $this->member_info['u_dpname'];?></li>
                <li class="ml10" style="width:45px; height:35px; overflow:hidden;"><?php echo $this->member_info['u_realname'];?></li>
            </ul>
            <div class="admin-tuichu"><a href="/auth/logout" title="退出"><img src="<?php echo BASE_STYLE;?>/images/ico_tuichu.png" /></a></div>
            <div class="admin-shezhi"><a href="javascript:;" class="J-resetpassword" title="设置"><img src="<?php echo BASE_STYLE;?>/images/ico_shezhi.png" /></a></div>
        </div>
        <!-- E 用户信息 -->
        <div class="clear"></div>
    </div>
</div>
<!-- E 头部 -->
<script type="text/javascript">
	$(document).ready(function(e) {
		$(".J-admin-header").on('mouseenter','dl',function(){
			$(this).find('dd').removeClass('fn-hide');
		}).on('mouseleave','dl',function(){
			$(this).find('dd').addClass('fn-hide');		
		});
		
		/*
		//顶部点击
		$(".J-admin-header").on('click','dt',function(){
			$(this).addClass('on').closest("dl").siblings().find('dt').removeClass('on');
		});
		
		$(".J-admin-header").on('click','.J-sub-nav > a',function(){
			$(this).addClass('on').siblings().removeClass('on');
			$(this).closest('dl').find('dt').addClass('on').closest('dl').siblings().find('dt').removeClass('on');	
		});
		*/
		
		
		//设置、修改密码
		$(".J-resetpassword").on('click',function(){
			var editHtml = '<iframe width="100%" height="100%" id="ifm_tab_MainPanel" name="ifm_tab_MainPanel" src="/setting/changepwd/" frameborder="0"></iframe>';
			var win = new Ext.Window({
					title:'修改密码',
					closeable:true,
					closeAction:'hide',
					modal:true,
					width:550,
					height:300,
					resizable:false,
					plain:true,
					layout:'fit',
					html:editHtml
				});
				
			win.show(this);		
		});
		
	});
</script>
<script type="text/javascript">
	//window.onresize = adjuest;
    //adjuest();
    //function adjuest(){
    //   alert(document.body.clientWidth);
    //}
	if(document.body.clientWidth<1300){
		$("h2.admin-logo").css('background-size','220px 48px');
		$("h2.admin-logo").css('width','220px');
		$("em").css('background-size','30px 30px');
		$("em").css('width','30px');
	}
</script>

